package cn.xuexiyuan.springstudy.core.demo03;

import cn.xuexiyuan.springstudy.core.demo03.entity.Computer;
import cn.xuexiyuan.springstudy.core.demo03.entity.Phone;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.xuexiyuan.springstudy.core.demo03");

        Phone phone = context.getBean(Phone.class);
        System.out.println(phone);

        Computer computer = context.getBean(Computer.class);
        System.out.println(computer);
    }
}
